#version 320 es

precision highp float;

layout (local_size_x = 64) in;

layout (std140, binding = 0) buffer ParticleBuffer {
    vec4 Particle[];
};

layout(location = 1) uniform float timestep;

void main()
{
    uint index = gl_GlobalInvocationID.x;
    vec4 status = Particle[index];
    vec3 position = status.xyz;
    vec3 velocity = vec3(0.0f, 1.0f, 0.0f);
    position += velocity * timestep;
    Particle[index] = vec4(position, status.w);
}